<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 场景：父子级的标签，子级的添加 上下边距会产生塌陷问题 -->
    <!-- 现象：导致父级一起向下移动 -->
    <style>
        *{
            box-sizing: border-box;
        }

        .father{
            width: 200px;
            height: 200px;
            background-color: skyblue;
            padding-top: 100px;
        }
        .son{
            width: 100px;
            height: 100px;
            background-color: pink;
            /* margin-top: 100px; */
            /* 解决办法：
            1.取消子级margin,父级设置padding
            2.父级设置overflow:hidden
            3.父级设置border-top
             */
        }
    </style>
</head>
<body>
    <div class="father">
        <div class="son">
            son
        </div>
    </div>
</body>
</html>